<?php


namespace App\Transformers\User;


use League\Fractal\TransformerAbstract;

class UserSignTransFormer extends TransformerAbstract
{
    public function transform($data)
    {
    return [
         'id'=>$data->id ,
         'user_id' =>$data->user_id ?? '',
         'title' =>$data->title ?? '',
         'number' =>$data->number ?? '',
         'balance' =>$data->balance ?? '',
         'count' =>$data->count ?? '',
         'remarks' =>$data->remarks ?? '',
         'created_at' => $data->created_at ? $data->created_at->format("Y-m-d H:i:s") : '',
         'updated_at' => $data->updated_at ? $data->updated_at->format("Y-m-d H:i:s") : '',
    ];

    }


}
